#include <SD.h>
#include <SPI.h>

#define AUDIO_INPUT_PIN A0


#define SERIAL_SETUP
#ifdef SERIAL_SETUP
#define print_info(msg) Serial.println(String("[INFO] ") + String((msg)))
#define print_err(err_msg) Serial.println(String("[ ERR] ") + String((err_msg)))
#endif

/*
 * global variables
 */
unsigned long last_millis;

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  while(!Serial){} // wait for serial port to connect. Needed for native USB.
  
  pinMode(AUDIO_INPUT_PIN, INPUT);
  last_millis = millis();  
  
}

void loop() {
  // put your main code here, to run repeatedly:
  if(millis() - last_millis > 50){
    int val = analogRead(AUDIO_INPUT_PIN);
    Serial.println(val);
    last_millis = millis();
  }
}
